<template>
    <div>
        <pre>
            test222(){
                const users = [
                    {name: "张含韵", "email": "zhang@email.com"},
                    {name: "江一燕", "email": "jiang@email.com"},
                    {name: "李小璐", "email": "li@email.com"}
                ];

                return users.map(function (user) {
                    return user.email;
                });
            }
        </pre>
        <button @click="test222">抽取arrayList某列值的集合</button>
        <p>
            {{str123}}
        </p>
    </div>
</template>

<script>
    export default {
        name: "LearnEs6Map",
        data(){
          return{
              str123:''
          }
        },
        methods:{
            test222(){
                const users = [
                    {name: "张含韵", email: "zhang@email.com"},
                    {name: "江一燕", email: "jiang@email.com"},
                    {name: "李小璐", email: "li@email.com"}
                ];

                const emailArray = users.map(function (user) {
                    return user.email;
                });

                this.str123 = JSON.stringify(emailArray);
            }
        }
    }
</script>

<style scoped>

</style>